<link href="css/hp_v3.css" rel="stylesheet" type="text/css"/>


<?php
$catid=$GLOBALS['smarty']->_var['goods_cat']['id'];

$sortnum=$GLOBALS['smarty']->_var['sortnum'];
if($sortnum=='')
{
 $sortnum==0;
}
$sortnum=$sortnum+1;
$GLOBALS['smarty']->assign('sortnum',$sortnum);
?>

<?php
   $GLOBALS['smarty']->assign('best_goods', get_cat_recommend_goods('best', $catid, 5));
   $GLOBALS['smarty']->assign('new_goods', get_cat_recommend_goods('new', $catid, 5));
   $GLOBALS['smarty']->assign('get_hotsell_goods', get_hotsell_goods($catid));
?>

<?php if ($this->_var['sortnum'] == 1): ?>  
	<div class="channel channel-wine mt15">

		<div class="channel-header">

			<h2><?php echo $this->_var['sortnum']; ?>F <?php echo htmlspecialchars($this->_var['goods_cat']['name']); ?></h2>

			<ul>
<?php $_from = get_child_tree($catid); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'child_tree');$this->_foreach['child_tree'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['child_tree']['total'] > 0):
    foreach ($_from AS $this->_var['child_tree']):
        $this->_foreach['child_tree']['iteration']++;
?>
  <?php if (($this->_foreach['child_tree']['iteration'] - 1) < 5): ?> 
				<li><a href="<?php echo $this->_var['child_tree']['url']; ?>" title="<?php echo $this->_var['child_tree']['name']; ?>" target="_blank"><?php echo $this->_var['child_tree']['name']; ?></a></li>
  <?php endif; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

				<li class="more"><a href="<?php echo $this->_var['goods_cat']['url']; ?>" target="_blank">全部<?php echo htmlspecialchars($this->_var['goods_cat']['name']); ?></a></li>

			</ul>

		</div>

		<div class="section grid-lmr">

			<div class="left">

				<div class="channel-brands">

					<ul>
<?php $_from = get_cat_brands($catid,category,10); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'get_brands_0_55033000_1502618331');$this->_foreach['get_brands'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['get_brands']['total'] > 0):
    foreach ($_from AS $this->_var['get_brands_0_55033000_1502618331']):
        $this->_foreach['get_brands']['iteration']++;
?> 
  <?php if ($this->_var['get_brands_0_55033000_1502618331']['brand_logo']): ?>
						<li><a href="<?php echo $this->_var['get_brands_0_55033000_1502618331']['url']; ?>" title="<?php echo $this->_var['get_brands_0_55033000_1502618331']['brand_name']; ?>" target="_blank"><img src="themes/yesmywine/images/1px.gif" original="data/brandlogo/<?php echo $this->_var['get_brands_0_55033000_1502618331']['brand_logo']; ?>" alt="<?php echo $this->_var['get_brands_0_55033000_1502618331']['brand_name']; ?>" width="80" height="40" border="0" /></a></li>
  <?php endif; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>   

						</ul>

				</div>

			</div>

			<div class="main">

				<div class="channel-slider">

					<ul class="slide-items">
<?php
   $GLOBALS['smarty']->assign('adlist',get_advlist('首页_分类商品'.$sortnum.'F',6));
?>
<?php $_from = $this->_var['adlist']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'ad');$this->_foreach['ad'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['ad']['total'] > 0):
    foreach ($_from AS $this->_var['ad']):
        $this->_foreach['ad']['iteration']++;
?>  
    <li><?php echo $this->_var['ad']['content']; ?></li>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
					</ul>

				</div>

			</div>

			<div class="right">

				<div class="channel-rightad">

<?php
   $GLOBALS['smarty']->assign('adlist',get_advlist('首页_分类商品'.$sortnum.'F_右侧',2));
?>
<?php $_from = $this->_var['adlist']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'ad');$this->_foreach['ad'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['ad']['total'] > 0):
    foreach ($_from AS $this->_var['ad']):
        $this->_foreach['ad']['iteration']++;
?>  
    <?php echo $this->_var['ad']['content']; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

					</div>

			</div>

		</div>

		<div class="section grid-mr">

			<div class="main">

				<div class="goodslist">

					<h3>

						<strong>精品推荐</strong>

						<a href="search.php?intro=best&category=<?php echo $this->_var['goods_cat']['id']; ?>" class="more">更多&gt;&gt;</a>

					</h3>

					<ul class="clearfix">
<?php $_from = $this->_var['best_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods_0_55078300_1502618331');$this->_foreach['best_goods'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['best_goods']['total'] > 0):
    foreach ($_from AS $this->_var['goods_0_55078300_1502618331']):
        $this->_foreach['best_goods']['iteration']++;
?>
		<li>

				<dl>

					<dt>

						<a class="pimg" href="<?php echo $this->_var['goods_0_55078300_1502618331']['url']; ?>" target="_blank" title="<?php echo htmlspecialchars($this->_var['goods_0_55078300_1502618331']['name']); ?>"><img src="themes/yesmywine/images/1px.gif" original="<?php echo $this->_var['goods_0_55078300_1502618331']['thumb']; ?>" width="110" height="180" alt="<?php echo htmlspecialchars($this->_var['goods_0_55078300_1502618331']['name']); ?>" /></a>

						</dt>

					<dd class="base">

						<a class="pname" href="<?php echo $this->_var['goods_0_55078300_1502618331']['url']; ?>" target="_blank" title="<?php echo htmlspecialchars($this->_var['goods_0_55078300_1502618331']['name']); ?>">

							<?php echo $this->_var['goods_0_55078300_1502618331']['short_name']; ?>

						</a>

						<p class="price">

							<span class="minprice">&yen;<strong><?php if ($this->_var['goods_0_55078300_1502618331']['promote_price'] != ""): ?><?php echo $this->_var['goods_0_55078300_1502618331']['promote_price']; ?><?php else: ?><?php echo $this->_var['goods_0_55078300_1502618331']['shop_price']; ?><?php endif; ?></strong></span>

							<span class="maxprice"><del>&yen;<?php echo $this->_var['goods_0_55078300_1502618331']['market_price']; ?></del></span>

						</p>

					</dd>

					<dd class="sum">

						<span class="soldnum">售出<strong><?php echo $this->_var['goods_0_55078300_1502618331']['sell_number']; ?></strong></span> 					

						<span class="ratepercent">评论<strong><?php echo $this->_var['goods_0_55078300_1502618331']['comment_count']; ?></strong></span>

						</dd>
                   <?php if ($this->_var['goods_0_55078300_1502618331']['brief']): ?>
					<dd class="slogan">
						<p><?php echo $this->_var['goods_0_55078300_1502618331']['brief']; ?></p>
					</dd>
                   <?php endif; ?>
				</dl>

			</li>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

		</ul>

					<h3>

						<strong>新品上市</strong>

						<a href="search.php?intro=new&category=<?php echo $this->_var['goods_cat']['id']; ?>" class="more">更多&gt;&gt;</a>

					</h3>

					<ul class="clearfix">

<?php $_from = $this->_var['new_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods_0_55138800_1502618331');$this->_foreach['new_goods'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['new_goods']['total'] > 0):
    foreach ($_from AS $this->_var['goods_0_55138800_1502618331']):
        $this->_foreach['new_goods']['iteration']++;
?>
			<li goodsId="5174975">

				<dl>

					<dt>

						<a class="pimg" href="<?php echo $this->_var['goods_0_55138800_1502618331']['url']; ?>" target="_blank" title="<?php echo $this->_var['goods_0_55138800_1502618331']['goods_name']; ?>"><img src="themes/yesmywine/images/1px.gif" original="<?php echo $this->_var['goods_0_55138800_1502618331']['thumb']; ?>" width="110" height="180" alt="<?php echo $this->_var['goods_0_55138800_1502618331']['goods_name']; ?>" /></a>


						</dt>

					<dd class="base">

						<a class="pname" href="<?php echo $this->_var['goods_0_55138800_1502618331']['url']; ?>" target="_blank" title="<?php echo $this->_var['goods_0_55138800_1502618331']['goods_name']; ?>">
							<?php echo $this->_var['goods_0_55138800_1502618331']['short_name']; ?>
						</a>

						<p class="price">

							<span class="minprice">&yen;<strong><?php if ($this->_var['goods_0_55138800_1502618331']['promote_price'] != ""): ?><?php echo $this->_var['goods_0_55138800_1502618331']['promote_price']; ?><?php else: ?><?php echo $this->_var['goods_0_55138800_1502618331']['shop_price']; ?><?php endif; ?></strong></span>

							<span class="maxprice"><del>&yen;<?php echo $this->_var['goods_0_55138800_1502618331']['market_price']; ?></del></span>

						</p>

					</dd>

					<dd class="sum">

						<span class="soldnum">售出<strong><?php echo $this->_var['goods_0_55138800_1502618331']['sell_number']; ?></strong></span> 					

						</dd>

                   <?php if ($this->_var['goods_0_55138800_1502618331']['brief']): ?>
					<dd class="slogan">
						<p><?php echo $this->_var['goods_0_55138800_1502618331']['brief']; ?></p>
					</dd>
                   <?php endif; ?>

				</dl>

			</li>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

		</ul>

				</div>

			</div>

			<div class="right">

				<div class="channel-topboard">

					<h4></h4>

					<ul>
<?php $_from = $this->_var['get_hotsell_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods_0_55185000_1502618331');$this->_foreach['top_goods'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['top_goods']['total'] > 0):
    foreach ($_from AS $this->_var['goods_0_55185000_1502618331']):
        $this->_foreach['top_goods']['iteration']++;
?>
  <?php if (($this->_foreach['top_goods']['iteration'] - 1) < 10): ?>
						<li class="<?php if (($this->_foreach['top_goods']['iteration'] - 1) < 3): ?>hot on<?php endif; ?>">

							<em><?php echo $this->_foreach['top_goods']['iteration']; ?></em>

							<a href="<?php echo $this->_var['goods_0_55185000_1502618331']['url']; ?>" target="_blank" class="prod-img" title="<?php echo $this->_var['goods_0_55185000_1502618331']['goods_name']; ?>"><img src="themes/yesmywine/images/1px.gif" original="<?php echo $this->_var['goods_0_55185000_1502618331']['thumb']; ?>" width="60" height="98" border="0" alt="" /></a>

							<a href="<?php echo $this->_var['goods_0_55185000_1502618331']['url']; ?>" target="_blank" class="prod-name" title="<?php echo $this->_var['goods_0_55185000_1502618331']['goods_name']; ?>"><?php echo $this->_var['goods_0_55185000_1502618331']['goods_name']; ?></a>

							<span class="prod-soldnum">售出 <strong><?php echo $this->_var['goods_0_55185000_1502618331']['goods_number']; ?></strong></span>

							<span class="prod-price">

								&yen;<strong><?php if ($this->_var['goods_0_55185000_1502618331']['promote_price'] != ""): ?><?php echo $this->_var['goods_0_55185000_1502618331']['promote_price']; ?><?php else: ?><?php echo $this->_var['goods_0_55185000_1502618331']['price']; ?><?php endif; ?></strong>

								<del>&yen;<?php echo $this->_var['goods_0_55185000_1502618331']['market_price']; ?></del>

								</span>

						</li>
  <?php endif; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

						</ul>

				</div>

			</div>

		</div>

	</div>

<?php else: ?>

	<div class="channel channel-yangjiu mt15">

		<div class="channel-header">

			<h2><?php echo $this->_var['sortnum']; ?>F <?php echo htmlspecialchars($this->_var['goods_cat']['name']); ?></h2>

			<ul>
<?php $_from = get_child_tree($catid); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'child_tree');$this->_foreach['child_tree'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['child_tree']['total'] > 0):
    foreach ($_from AS $this->_var['child_tree']):
        $this->_foreach['child_tree']['iteration']++;
?>
  <?php if (($this->_foreach['child_tree']['iteration'] - 1) < 5): ?> 
				<li><a href="<?php echo $this->_var['child_tree']['url']; ?>" title="<?php echo $this->_var['child_tree']['name']; ?>" target="_blank"><?php echo $this->_var['child_tree']['name']; ?></a></li>
  <?php endif; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

				<li class="more"><a href="<?php echo $this->_var['goods_cat']['url']; ?>" target="_blank">全部<?php echo htmlspecialchars($this->_var['goods_cat']['name']); ?></a></li>

			</ul>

		</div>

		<div class="section grid-mr">

			<div class="main">

				<div class="clearfix">

					<div class="left">

						<div class="channel-brands">

							<ul>

<?php $_from = get_cat_brands($catid,category,10); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'get_brands_0_55274700_1502618331');$this->_foreach['get_brands'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['get_brands']['total'] > 0):
    foreach ($_from AS $this->_var['get_brands_0_55274700_1502618331']):
        $this->_foreach['get_brands']['iteration']++;
?> 
  <?php if ($this->_var['get_brands_0_55274700_1502618331']['brand_logo']): ?>
						<li><a href="<?php echo $this->_var['get_brands_0_55274700_1502618331']['url']; ?>" title="<?php echo $this->_var['get_brands_0_55274700_1502618331']['brand_name']; ?>" target="_blank"><img src="themes/yesmywine/images/1px.gif" original="data/brandlogo/<?php echo $this->_var['get_brands_0_55274700_1502618331']['brand_logo']; ?>" alt="<?php echo $this->_var['get_brands_0_55274700_1502618331']['brand_name']; ?>" width="80" height="40" border="0" /></a></li>
  <?php endif; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>  

								</ul>

						</div>

					</div>

					<div class="main">

						<div class="channel-slider">

							<ul class="slide-items">
<?php
   $GLOBALS['smarty']->assign('adlist',get_advlist('首页_分类商品'.$sortnum.'F',4));
?>
<?php $_from = $this->_var['adlist']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'ad');$this->_foreach['ad'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['ad']['total'] > 0):
    foreach ($_from AS $this->_var['ad']):
        $this->_foreach['ad']['iteration']++;
?>  
    <li><?php echo $this->_var['ad']['content']; ?></li>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
							</ul>

						</div>

					</div>

				</div>

				<div class="goodslist">

					<ul class="clearfix">
                    
<?php $_from = $this->_var['best_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods_0_55310000_1502618331');$this->_foreach['best_goods'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['best_goods']['total'] > 0):
    foreach ($_from AS $this->_var['goods_0_55310000_1502618331']):
        $this->_foreach['best_goods']['iteration']++;
?>
		<li>

				<dl>

					<dt>

						<a class="pimg" href="<?php echo $this->_var['goods_0_55310000_1502618331']['url']; ?>" target="_blank" title="<?php echo htmlspecialchars($this->_var['goods_0_55310000_1502618331']['name']); ?>"><img src="themes/yesmywine/images/1px.gif" original="<?php echo $this->_var['goods_0_55310000_1502618331']['thumb']; ?>" width="110" height="180" alt="<?php echo htmlspecialchars($this->_var['goods_0_55310000_1502618331']['name']); ?>" /></a>

						</dt>

					<dd class="base">

						<a class="pname" href="<?php echo $this->_var['goods_0_55310000_1502618331']['url']; ?>" target="_blank" title="<?php echo htmlspecialchars($this->_var['goods_0_55310000_1502618331']['name']); ?>">

							<?php echo $this->_var['goods_0_55310000_1502618331']['short_name']; ?>

						</a>

						<p class="price">

							<span class="minprice">&yen;<strong><?php if ($this->_var['goods_0_55310000_1502618331']['promote_price'] != ""): ?><?php echo $this->_var['goods_0_55310000_1502618331']['promote_price']; ?><?php else: ?><?php echo $this->_var['goods_0_55310000_1502618331']['shop_price']; ?><?php endif; ?></strong></span>

							<span class="maxprice"><del>&yen;<?php echo $this->_var['goods_0_55310000_1502618331']['market_price']; ?></del></span>

						</p>

					</dd>

					<dd class="sum">

						<span class="soldnum">售出<strong><?php echo $this->_var['goods_0_55310000_1502618331']['sell_number']; ?></strong></span> 					

						<span class="ratepercent">评论<strong><?php echo $this->_var['goods_0_55310000_1502618331']['comment_count']; ?></strong></span>

						</dd>
                   <?php if ($this->_var['goods_0_55310000_1502618331']['brief']): ?>
					<dd class="slogan">
						<p><?php echo $this->_var['goods_0_55310000_1502618331']['brief']; ?></p>
					</dd>
                   <?php endif; ?>
				</dl>

			</li>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

		</ul>

				</div>

			</div>

			<div class="right">

				<div class="channel-topboard">

					<h4></h4>

					<ul>
                    
<?php $_from = $this->_var['get_hotsell_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods_0_55364000_1502618331');$this->_foreach['top_goods'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['top_goods']['total'] > 0):
    foreach ($_from AS $this->_var['goods_0_55364000_1502618331']):
        $this->_foreach['top_goods']['iteration']++;
?>
  <?php if (($this->_foreach['top_goods']['iteration'] - 1) < 10): ?>
						<li class="<?php if (($this->_foreach['top_goods']['iteration'] - 1) < 1): ?>on<?php endif; ?>">

							<em><?php echo $this->_foreach['top_goods']['iteration']; ?></em>

							<a href="<?php echo $this->_var['goods_0_55364000_1502618331']['url']; ?>" target="_blank" class="prod-img" title="<?php echo $this->_var['goods_0_55364000_1502618331']['goods_name']; ?>"><img src="themes/yesmywine/images/1px.gif" original="<?php echo $this->_var['goods_0_55364000_1502618331']['thumb']; ?>" width="60" height="98" border="0" alt="" /></a>

							<a href="<?php echo $this->_var['goods_0_55364000_1502618331']['url']; ?>" target="_blank" class="prod-name" title="<?php echo $this->_var['goods_0_55364000_1502618331']['goods_name']; ?>"><?php echo $this->_var['goods_0_55364000_1502618331']['goods_name']; ?></a>

							<span class="prod-soldnum">售出 <strong><?php echo $this->_var['goods_0_55364000_1502618331']['goods_number']; ?></strong></span>

							<span class="prod-price">

								&yen;<strong><?php if ($this->_var['goods_0_55364000_1502618331']['promote_price'] != ""): ?><?php echo $this->_var['goods_0_55364000_1502618331']['promote_price']; ?><?php else: ?><?php echo $this->_var['goods_0_55364000_1502618331']['price']; ?><?php endif; ?></strong>

								<del>&yen;<?php echo $this->_var['goods_0_55364000_1502618331']['market_price']; ?></del>

								</span>

						</li>
  <?php endif; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

						</ul>

				</div>

			</div>

		</div>

	</div>

<?php endif; ?>